import warnings
warnings.filterwarnings("ignore")

from langchain.tools import StructuredTool
from .FinishTool import finish 
from .DateTimeTool import get_current_datetime
from .FileQATool import ask_docment
from .FileTool import list_files_in_directory
from .RequestTool import request
from .BankMockTool import verify_code, query_saving_account_by_id, report_lost_saving_account, query_credit_account_by_id
from .BankCustomerMockTool import provide_my_info, provide_my_verify_code, provide_process_account_type

finish_placeholder = StructuredTool.from_function(
    func=finish,
    name="FINISH",
    description="结束任务，将最终答案返回"
)

get_datetime_tool=StructuredTool.from_function(
    func=get_current_datetime,
    name="GetCurrentTime",
    description="获得当前的日期和时间"
)

provide_process_account_type_tool = StructuredTool.from_function(
    func=provide_process_account_type,
    name="ProvideProcessAccountType",
    description="输出需要操作的账户类型",
)

provide_my_info_tool = StructuredTool.from_function(
    func=provide_my_info,
    name="ProvideMyInfo",
    description="输出我的信息",
)

provide_my_verify_code_tool = StructuredTool.from_function(
    func=provide_my_verify_code,
    name="ProvideMyVerifyCode",
    description="输出银行发送给我的手机验证码",
)

verify_code_tool = StructuredTool.from_function(
    func=verify_code,
    name="VerifyCode",
    description="核验客户提供的手机验证码是否正确",
)

query_saving_account_by_id_tool = StructuredTool.from_function(
    func=query_saving_account_by_id,
    name="QuerySavingAccountInfoById",
    description="通过身份证尾号查询客户的储蓄账户信息，可能返回多个账号",
)

query_credit_account_by_id_tool = StructuredTool.from_function(
    func=query_credit_account_by_id,
    name="QueryCreditAccountInfoById",
    description="通过身份证尾号查询客户信用卡账户信息，可能返回多个账号",
)

uery_credit_account_by_id_tool = StructuredTool.from_function(
    func=query_credit_account_by_id,
    name="QueryCreditAccountInfoById",
    description="通过身份证尾号查询客户信用卡账户信息，可能返回多个账号",
)

report_lost_saving_account_tool = StructuredTool.from_function( 
    func=report_lost_saving_account,
    name="ReportLostSavingAccount",
    description="挂失客户的储蓄账户",
)

document_qa_tool = StructuredTool.from_function(
    func=ask_docment,
    name="AskDocument",
    description="根据一个Word或PDF文档的内容，回答一个问题。考虑上下文信息，确保问题对相关概念的定义表述完整。",
)

directory_inspection_tool = StructuredTool.from_function(
    func=list_files_in_directory,
    name="ListDirectory",
    description="探查文件夹的内容和结构，展示它的文件名和文件夹名",
)

request_placeholder = StructuredTool.from_function(
    func=request,
    name="REQUET_FINISH",
    description="询问用户信息"
)
